import request from '@/router/axios';
import qs from 'qs';

// 数据列表-报损报废
export const getListDangerousInventory = (data) => request({
    url: '/damageTable/v1/pageQuery',
    method: 'post',
    data: qs.stringify(data),
})
// 获取-报损报废
export const getDangerousInventory = (data) => request({
    url: '/damageTable/v1/findById?id='+data,
    method: 'post',
})

// 添加-报损报废
export const addDangerousInventory = (data) => request({
    url: '/damageTable/v1/insert',
    method: 'post',
    data: data,
})
// 修改-报损报废
export const updDangerousInventory = (data) => request({
    url: '/damageTable/v1/update',
    method: 'post',
    data: data,
})
// 删除-报损报废
export const delDangerousInventory = (data) => request({
    url: '/damageTable/v1/getById?id='+data,
    method: 'post',
})

// 提交-报损报废
export const delDangerousSubmission = (data) => request({
    url: '/damageTable/v1/submission?id='+data,
    method: 'post',
})

// 审核-报损报废
export const delDangerousToExamine = (data) => request({
    url: '/damageTable/v1/toExamine',
    method: 'post',
    data: qs.stringify(data),
})

// 撤销-报损报废
export const delDangerousRevoke = (data) => request({
    url: '/damageTable/v1/revoke?id='+data,
    method: 'post',
})

// 审批状态查看-报损报废
export const approvalDangerousRevoke = (data) => request({
    url: '/damageTable/v1/stat?id='+data,
    method: 'post',
})

// 添加退货-报损报废
// export const getDangerousGoods = (data) => request({
//     url: '/damageTable/v1/getDangerousGoods',
//     method: 'post',
//     data: qs.stringify(data),
// })


// 添加退货-报损报废
export const lossScrapping = (data) => request({
    url: '/realTimeDangerousGoods/v1/pageQuery',
    method: 'post',
    data: qs.stringify(data),
})

// // 报损报废
// export const lossScrapping = (data) => request({
//     url: '/damageTable/v1/getGoods',
//     method: 'post',
//     data: qs.stringify(data),
// })
